<template>
	<view class="notice">
		<div class="list" v-for="(item,index) in list" :key="index">
			<div class="list-hd">
				<span>{{item.operatorName}}</span>
				<span>{{filterData2(item.updateTime)}}</span>
			</div>
			<div class="list-bd">
				<div class="title">{{item.noticeTitle}}</div>
				<div class="content">{{item.content}}</div>
			</div>
		</div>
	</view>
</template>
<script>
	import { filterData2 } from '@/static/js/filter.js'
	export default{
		data(){
			return {
				list:[]
			}
		},
		onLoad() {
			this.$api.messageNoticeList({pageIndex:1,pageSize:20,status:2}).then((res)=>{
				this.list = res.data.result.list || []
			})
		},
		methods:{
			filterData2
		}
	}
</script>
<style scoped lang="scss">
.notice{
	min-height: calc(100vh - 88upx);
	background: #f8f8f8;
	padding: 24upx;
	.list{
		padding: 18upx 24upx 50upx 24upx;
		background: #fff;
		border-radius: 20upx;
		margin-bottom: 30upx;
		&-hd{
			display: flex;
			padding-bottom: 16upx;
			border-bottom: 1upx solid #EAEAEA;
			justify-content: space-between;
			align-items: center;
			span{
				&:nth-of-type(1){
					font-size: 26upx;
					background: #F6ECFA;
					border-radius: 6upx;
					color: #B000FF;
					padding: 8upx 12upx;
				}
				&:nth-of-type(2){
					font-size: 26upx;
					color: #666666;
				}
			}
		}
		&-bd{
			.title{
				font-size: 30upx;
				color: #333;
				text-align: center;
				margin: 28upx 0;
			}
			.content{
				font-size: 28upx;
				color: #333;
			}
		}
	}
}
</style>
